"""
5、猜数字游戏
"""
import random

print(f'数字猜谜游戏,范围为1到10')

result = random.randint(1, 10)
flag = 1
while flag == 1:
    choose = eval(input('请输入你猜的数字'))
    if choose > result:
        print(f'你猜的数字太大了')
    elif choose < result:
        print(f'你猜的数字太小了')
    else:
        print(f'恭喜你猜对了')
        flag = 0
